package com.tj.collection.enums;

/**
 * Created with IntelliJ IDEA.
 * User: pavan
 * Date: 2020/2/26
 * Time: 上午11:26
 */
public enum OutboundBatchStatusEnum {
    UN_SUBMIT(-1, "未提交"),
    SUBMITTED(0, "提交完成"),
    CALL_PROCESSING(1, "处理中"),
    CALL_COMPLETION(2, "处理完成"),
    ;

    private Integer status;

    private String desc;

    OutboundBatchStatusEnum(Integer status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public Integer getStatus() {
        return status;
    }

    public OutboundBatchStatusEnum setStatus(Integer status) {
        this.status = status;
        return this;
    }

    public String getDesc() {
        return desc;
    }

    public OutboundBatchStatusEnum setDesc(String desc) {
        this.desc = desc;
        return this;
    }

    public static OutboundBatchStatusEnum getEnum(Integer status) {
        for (OutboundBatchStatusEnum enums : OutboundBatchStatusEnum.values()) {
            if (enums.getStatus().equals(status)) {
                return enums;
            }
        }
        return null;
    }
}
